package com.ttxs.fileformathandling.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ttxs.fileformathandling.model.dto.file.FileRecordQueryRequest;

import com.ttxs.fileformathandling.model.dto.file.UploadFileRequest;
import com.ttxs.fileformathandling.model.dto.file.UploadFileResult;

import com.ttxs.fileformathandling.model.entity.FileRecord;
import com.baomidou.mybatisplus.extension.service.IService;

import com.ttxs.fileformathandling.model.vo.FileRecordVO;


import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author cwt
* @description 针对表【file_record(用户上传文件表)】的数据库操作Service
* @createDate 2023-05-27 23:05:19
*/
public interface FileRecordService extends IService<FileRecord> {

    void validApi(FileRecord fileRecord, boolean add);

    /**
     * 文件上传
     * @param uploadFileRequest
     * @param request
     * @return
     */
    UploadFileResult uploadFile(UploadFileRequest uploadFileRequest, HttpServletRequest request);


    /**
     * 数据脱敏
     * @param recordList
     * @return
     */
    public List<FileRecordVO> getRecordVOList(List<FileRecord> recordList);
    /**
     * 获取查询条件
     *
     * @param fileRecordQueryRequest 查询请求
     * @return 获取查询条件
     */
    QueryWrapper<FileRecord> getQueryWrapper(FileRecordQueryRequest fileRecordQueryRequest, HttpServletRequest request);
}
